import request from '@/utils/request'

// 黑名单列表
export const getRefundList = data =>
  request({
    url: '/base/blacklist/index',
    method: 'post',
    data,
  })

export const createBlackList = data =>
  request({
    url: '/base/blacklist/create',
    method: 'post',
    data,
  })

// 黑名单修改
export const updateBlacklist = data =>
  request({
    url: `/base/blacklist/${data.id}/edit`,
    method: 'post',
    data,
  })

// 黑名单详情
export const detailBlacklist = params =>
  request({
    url: `/base/blacklist/${params.id}`,
    method: 'get',
    params,
  })

// 黑名单导入
export const importBlacklist = data =>
  request({
    url: `/base/blacklist/import`,
    method: 'post',
    data,
  })

export const statusBlacklist = data =>
  request({
    url: `/base/blacklist/status`,
    method: 'post',
    data,
  })

export const deleteBlacklist = data =>
  request({
    url: `/base/blacklist/del`,
    method: 'post',
    data,
  })

export const downloadTemplate = params =>
  request({
    url: `/base/blacklist/import-tpl`,
    method: 'get',
    params,
  })

export const expenseCustomImport = data => {
  request({
    url: `/base/blacklist/import`,
    method: 'post',
    data,
  })
}
